package com.gwnet.rider.enums;

/**
 * 骑手工作状态  1.接单 0.停止接单
 * @author: WangLiang
 * @date: 2024/8/1 9:29
 */
public enum WorkStatusEnums {


    ONLINE(1,"正在接单"),

    STOP(0,"停止接单");


    private Integer code;
    private String desc;

    WorkStatusEnums(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer code() {
        return code;
    }

    public String desc() {
        return desc;
    }

    public static WorkStatusEnums instance(Integer value) {
        WorkStatusEnums[] enums = values();
        for (WorkStatusEnums statusEnum : enums) {
            if (statusEnum.code().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
